import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)
//路由
import router from './router/index'
//饿了么
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
/** 饿了么ICON组,固定写法,不需要修改 */
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
/** Pinia全局变量 */
import {createPinia} from 'pinia'
const store =createPinia()
/** 引入echarts和全局配置 */
import * as echarts from 'echarts'
app.config.globalProperties.$echarts = echarts
/** 控制平台图片网址,图片前缀,因为图片都是/xxx/xxx 没有前面的https// 来自哪个地方,根据图片上传地址进行更改 */
app.config.globalProperties.$httpUrl = 'https://www.evogodz.cn'

//使用路由
app.use(router)
//使用饿了么+
app.use(ElementPlus)
//使用pinia菠萝全局变量
app.use(store)

app.mount('#app')
createApp(App)
